package org.tcshare.dialog;

import android.content.Context;
import android.content.DialogInterface;

import androidx.appcompat.app.AlertDialog;

public class MsgDialogUtil {

    public static void showMsg(Context ctx, String msg) {
        new AlertDialog.Builder(ctx)
                .setTitle("信息")
                .setMessage(msg)
                .setPositiveButton("确定", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                    }
                }).show();

    }

    public static void showMsg(Context ctx, String msg, DialogInterface.OnClickListener ok) {
        new AlertDialog.Builder(ctx)
                .setTitle("信息")
                .setMessage(msg)
                .setPositiveButton("确定", ok).show();

    }
}
